﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Circle.Domain.Interface.Repository;
using Circle.Domain.Entity;
using Circle.Domain.Interface;
using Circle.Domain;
using System.Data.Entity;

namespace Circle.Data.Repository
{
    public class SettingRepository : Repository<Setting>, ISettingRepository
    {
        public SettingRepository(ICircleDbContext context) : base(context) { }

        public Setting GetDefaultSetting()
        {
            return this.All.Where(x => x.IsDefault).Include(x =>x.NewMemberStartRole)
                            .Include(x =>x.SuperAdminUser).Include(x => x.Language).SingleOrDefault();
        }
    }
}
